package com.zx.zxblog.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zx.zxblog.entity.pojo.Blog;
import com.zx.zxblog.entity.vo.BlogVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * className=BlogMapper
 * package=com.zx.zxblog.mapper
 * description:
 *
 * @Author:SKEZhi
 * @Create:2024/4/4 - 21:59
 * @Version: v1.0
 */
@Mapper
public interface BlogMapper extends BaseMapper<Blog> {

    List<BlogVO> getRecommendList();

    int updateViews(Long blogId);

    int updateCommentCount(Long blogId);

    Long countViews();

    String getTitleById(@Param("id") Long id);

    List<BlogVO> pageAdminBlogs();

    Boolean saveBlogTags(@Param("blogId") Long id,@Param("tagIds") List<Long> tagIds);

    BlogVO getBlogVO(Long id);

    List<Long> getBlogIdsByTagIds(@Param("tagIds") long[] tagIds);

    Boolean deleteAllBlogTags(@Param("blogId")Long blogId);

    List<BlogVO> pageBlogs();

    List<BlogVO> getBlogListByBlogIds(@Param("blogIds") List<Long> blogIds);

    List<BlogVO> getBlogList();

    List<Blog> getAllTitle();



}
